package com.yonyou.marketing.app.api.service;

import java.util.List;
import java.util.Map;

import org.marketing.common.Response;
import org.marketing.common.dto.maintenanceorder.MaintenanceDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.yonyou.marketing.app.api.entity.EvaluationResultPO;


@FeignClient(name="SERVICE-MAINTENANCEORDER" )
public interface RepairRecordInterface {

	@RequestMapping(value = "/maintenanceorder/api/v1/maintenanceorder", method = RequestMethod.GET)
	Map<String, Object> maintenanceorder(@RequestParam("userId_") String userId_
			,@RequestParam("vin") String vin);
	
	@RequestMapping(value = "/maintenanceorder/api/v1/detail", method = RequestMethod.GET)
	List<MaintenanceDto> detail(@RequestParam("maintenanceWorkOrderNum") String maintenanceWorkOrderNum
			,@RequestParam("dealerCode") String dealerCode);
	
	@RequestMapping(value = "/maintenanceorder/api/v1/addEvaluation", method = RequestMethod.GET)
	Response<EvaluationResultPO> addEvaluation(@RequestParam("type") Integer type
			,@RequestParam("orderNumber") String orderNumber
			,@RequestParam("evaType") Integer evaType
			,@RequestParam("userId_") String userId_);
	
	@RequestMapping(value = "/maintenanceorder/api/v1/saveEvaluation", method = RequestMethod.POST)
	Response<Map<String, Object>> saveEvaluation(@RequestBody EvaluationResultPO evaluationResultPO
			,@RequestParam("userId_") String userId_);
	
	@RequestMapping(value = "/maintenanceorder/api/v1/checkEvaluation", method = RequestMethod.GET)
	Response<Map<String, Object>> checkEvaluation(@RequestParam("type") Integer type
			,@RequestParam("orderNumber") String orderNumber
			,@RequestParam("userId_") String userId_);
}
